The present invention relates to an improved waveform data analysis method and waveform data analysis apparatus suitable for automatic performances, particularly automatic accompaniments, executed by personal computers, electronic musical instruments, amusement equipment, etc. as well as a computer program to be used for the waveform data analysis.
Heretofore, there has been known the technique of recording tones of a natural musical instrument or the like of certain lengths and then automatically reproducing the thus-recorded tones repetitively at a rate corresponding to a set tempo. With this technique, often used in an automatic accompaniment of rhythm tones or the like, it is necessary to expand or compress the original waveforms in accordance with a set tempo, in order to avoid reproduction pitch variations. For example, to this end, original waveform data, obtained by stereophonic recording of tones of a natural musical instrument or the like are divided at rise portions (for convenience of description, hereinafter referred to as “waveform data control points”) of an envelope and thereby divided into a plurality of sections (for convenience of description, hereinafter referred to as “original sections”). When an automatic rhythm accompaniment or the like is to be performed using such original waveform data, the original waveform data may be reproduced repetitively as they are without being subjected to particular processing, as long as the waveform data are reproduced at a same tempo as when they were recorded (i.e., as long as the reproducing tempo of the waveform data is the same as the original recording tempo).
When, however, the reproducing tempo is to be faster than the original recording tempo, it is necessary to shorten the individual original sections to be reproduced; for this purpose, respective end segments of the original sections may be cut off at a given ratio. For example, if the original recording tempo is “100” and the reproducing tempo is “125”, the end segments of the individual original sections may each be cut off by 20% to allow only the remaining waveform data to be reproduced. On the other hand, when the reproducing tempo is to be slower than the original recording tempo, there arises a problem. Namely, if reproduction start timing of the individual original sections is simply delayed in accordance with the desired reproducing tempo, silent segments are produced in gaps between the successive original sections, which tend to become offensive to the ears. Thus, it has been conventional, to add, to each of the gaps between the original sections, a necessary length of the waveform data of the immediately-preceding original section. At that time, the initial amplitude value of a portion of the waveform data to be added to fill in the gap is set to coincide with the amplitude value of a portion of the waveform data immediately preceding the to-be-added portion.
However, the above-mentioned conventional technique has not been satisfactory in that the waveform data control points, i.e. dividing positions for waveform control, can not be necessarily set at appropriate positions. Namely, although the conventional technique is arranged to set the waveform data control point at a position of the envelope where the amplitude exceeds a predetermined threshold value, no waveform data control point is sometimes set automatically even at a position that can be identified as a rise portion through the human auditory sense because the peak does not reach the threshold value. In such a case, a plurality of beats may be undesirably included in a single original section, and the tempo compression/expansion can not be executed properly between these beats. Conversely, at a position where there is a great envelope variation, a plurality of the waveform data control points are sometimes set at the position even though the position is identified as a single beat through the human auditory sense, so that unnatural compression/expansion tends to be executed.
Further, where the original recording tempo and reproducing tempo are different from each other and if the reproduction start timing of the individual sections is controlled simply in accordance with a ratio between the original recording tempo and the reproducing tempo, there would be undesirably produced a sense of “tardiness” or “heaviness” particularly in a waveform having slow rise portions. Specific example of the “tardiness” or “heaviness” will be later explained in relation to FIG. 3A, which may be referred to as necessary. In short, the problem of the “tardiness” “heaviness” is due to the fact that reproducing a waveform time-axially expanded to make the reproducing tempo slower than the standard tempo would make listeners to feel as if beats occurred at timing earlier than preferred timing while reproducing a waveform at a faster tempo than the recording tempo would make listeners to feel as if beats occurred at timing later than preferred timing.
Further, it has been known to use the following devices or software in order to compress or expand an original waveform in accordance with a set tempo.                (1) Sampler: The sampler samples an analog waveform and converts it into digital waveform data. There have been known two major types of samplers, one type for recording a single tone waveform and the other type for recording a phrase waveform made up of a plurality of tones; the other type is commonly known as a “phrase sampler”.        (2) Slicer: The slicer allocates serial note numbers to divided waveform data starting with the leading waveform data, and generates and stores automatic performance information composed of the allocated note numbers and timing (dividing positions), i.e. generates and stores sequence data for driving the divided waveform data. Original waveform data (waveform data before the division) can be reproduced by executing an automatic performance on the basis of the automatic performance information at the original recording tempo while triggering the divided waveform data in response to reproduced note-on events. If the tempo is changed, the timing of the note-on events varies in accordance with the changed tempo so that the waveform data as a whole are expanded or compressed in a time-axial direction.        (3) Sequencer: The sequencer reproduces the above-mentioned sequence data. However, in addition to reproducing the sequence data merely as they are, the sequencer can reproduce the sequence data at any desired tempo by increasing or decreasing the reproducing speed as appropriate. Note that the reproduction timing of the individual unit waveform data can of course be independently varied as desired in advance by previously editing the sequence data. As the sequence data are supplied to a suitable tone generator, tone waveforms are reproduced on the basis of the reproduced sequence data.        
Let's now consider a case where a new track is added to given original sequence data and additional sequence data obtained by the above-mentioned technique are written into the new track so as to create ensemble (synthesized) sequence data. Because the original sequence data and additional sequence data are recorded independently of each other, merely writing the additional sequence data into the new track would result in undesired timing differences between the original sequence data and the additional sequence data. Thus, there is a need to deliberately adjust the timing of the original sequence data and additional sequence data to accurately coincide with each other, which is a very complex and troublesome task. Particularly, in a case where the tempo of the original sequence data is varied at a halfway position of the sequence data, for example, it is necessary to perform the timing adjustment here and there in a music piece in question. Further, because the conventional technique is arranged to divide the waveform data only on the basis of dividing positions obtained through analysis of an envelope of the waveform data, there is a possibility of the dividing positions being detected erroneously or the waveform data being divided at musically inappropriate positions.